package com.ldzy.webase.utils;

import lombok.Data;

import java.io.Serializable;

@Data
public class ResponseToken<T> implements Serializable {
    private int code;

    private String msg;

    private String token;

    public ResponseToken(ResponseCode responseCode, String token) {
        this.code = responseCode.getCode();
        this.msg = responseCode.getDesc();
        this.token = token;
    }


    public static <T> ResponseToken<T> build(ResponseCode responseCode, String token) {
        return new ResponseToken(responseCode, token);
    }

}
